package com.ti.shangou.dao;

import com.ti.shangou.pojo.entity.Role;
import com.ti.shangou.pojo.query.PageQuery;
import com.ti.shangou.pojo.vo.RoleVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

public interface RoleDao {
    int deleteByPrimaryKey(Integer roleId);

    int insert(Role record);

    int insertSelective(Role record);

    Role selectByPrimaryKey(Integer roleId);

    int updateByPrimaryKeySelective(Role record);

    int updateByPrimaryKey(Role record);

    List<RoleVO> selectHisRolesByRoles(String roles);

    List<RoleVO> selectRoleList(@Param("pageNum") Integer pageNum,@Param("pageSize") Integer pageSize);

    int selectRoleCount();

    List<RoleVO> selectSystemRoles();

    RoleVO selectRoleById(Integer roleId);

    int deleteRoleByList(@Param("roles") List<RoleVO> roles);


    List<Role> selectRolesByPermissions(@Param("permissions") Set<String> collect);
}